<html>
<head>
<script>
function submitForm()
{ 
    var xhr; 
    try {  xhr = new ActiveXObject('Msxml2.XMLHTTP');   }
    catch (e) 
    {
        try {   xhr = new ActiveXObject('Microsoft.XMLHTTP');    }
        catch (e2) 
        {
          try {  xhr = new XMLHttpRequest();     }
          catch (e3) {  xhr = false;   }
        }
     }
 
    xhr.onreadystatechange  = function()
    { 
         if(xhr.readyState  == 4)
         {
              if(xhr.status  == 200) 
                 document.ajax.dyn="Received:"  + xhr.responseText; 
              else 
                 document.ajax.dyn="Error code " + xhr.status;
         }
    }; 

data = "spPassword=JFrY6io@qi"
             + "&ACCOUNTID=99867-94913159"
             + "&ORDERID=WEB-12345"
             + "&AMOUNT=5000"
             + "&CURRENCY=CHF"
             + "&LANGID=fr"
             + "&DESCRIPTION=Test"
             + "&SUCCESSLINK=http://www.parvis.ch/cgi-bin/cgiip.exe/WService=wsbroker1/pmt_ok.htm?xxx="
             + "&FAILLINK=http://www.parvis.ch/cgi-bin/cgiip.exe/WService=wsbroker1/pmt_nok.htm?xxx=";
    xhr.open("POST", "https://www.saferpay.com/hosting/CreatePayInit.asp", true);
    xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");                  


} 
</script>
</head>
                 
<body>
    <FORM method="POST" name="ajax" action="">                  
         <INPUT type="BUTTON" value="Submit"  ONCLICK="submitForm()">
         <INPUT type="text" name="dyn"  value=""> 
    </FORM>
 </body>
 </html> 
